package com.np.retrofit211demo1.bean;

import android.text.TextUtils;

import java.io.Serializable;

public class UltrasoundResponse<T> implements Serializable {

    private String msg;
    private String message;
    private String traceId;
    private int code;
    private T data;

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    private T result;

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setData(T data) {
        this.data = data;
        if(data!=null&&result == null){
            setResult(data);
        }
    }

    public T getData() {
        return data;
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
        if(TextUtils.isEmpty(msg)) {
            setMsg(message);
        }
    }
}
